<?php 
class AppError extends ErrorHandler
{
	function __outputXMLError($message)
	{
		array_push($this->controller->helpers, 'xml');
		$this->controller->layout = 'xml/default';
		$this->controller->set("message", array('entries' => array('error' => 
						array('message' => $message))));
		$this->_outputMessage("error_xml");
	}
	function noSuchEntry($params)
	{
		$this->__outputXMLError("Entry with id " . $params['id'] . " does not exists.");
	}
	function notValidates()
	{
		$this->__outputXMLError("This entry cannot be added. Please ensure that all fields match their requirements");
	}
} 
?>